﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>运输情况</title>
    <!--<link href="../../script/css/bootstrap.css" rel="stylesheet" />
    <link href="../../script/css/bootstrap-theme.css" rel="stylesheet" />
    <link href="../../script/css/select2.css" rel="stylesheet" />
    <link href="../../script/css/bootstrap-datetimepicker.css" rel="stylesheet" />
    <script src="../../script/js/jquery-1.12.3.js"></script>
    <script src="../../script/js/bootstrap.js"></script>
    <script src="../../script/js/select2.full.js"></script>
    <script src="../../script/js/bootstrap-datetimepicker.js"></script>
    <script src="../../script/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="../../script/js/cus-edit.js"></script>-->
</head>
<body>
    <div>
        <form>

                                        <div class='row'>
                                                
                    <div class='col-md-6'>
                        <label>日期</label>
                        <input type='text' class='form-control datetimepicker' data-date-format='yyyy-mm-dd hh:ii' name='arrdate' data-type='date'>
                    </div>
                                                
                    <div class='col-md-6'>
                        <label>地点</label>
                        <select class='form-control' name='areaid'  data-type='select'></select>
                    </div>
                                        </div>

                                        <div class='row'>
                                                
                    <div class='col-md-12'>
                        <label>地址</label>
                        <textarea class='form-control' name='address' data-type='text'></textarea>
                    </div>
                                                
                    <div class='col-md-6'>
                        <label>公司</label>
                        <select class='form-control' name='companyid'  data-type='select'></select>
                    </div>
                                        </div>

                                        <div class='row'>
                                                
                    <div class='col-md-6' style="display:none;">
                        <label>订单</label>
                        <input class='form-control' name='orderid' data-type='text' />
                    </div>
                                                
                    <div class='col-md-12'>
                        <label>备注</label>
                        <textarea class='form-control' name='remark' data-type='text'></textarea>
                    </div>
                                        </div>
        </form>
        <div style="margin-top:1em;display:none;">
            <button class="btn btn-primary" onclick="order_line_editFrm.ok();">确定</button>
            <button class="btn btn-default" onclick="order_line_init.back()">取消</button>
        </div>
    </div>
    <script>
        var order_line_edit;

        var order_line_editFrm = {
            ok: function () {
                //order_line_edit.refObj()
                //console.log(JSON.stringify(order_line_edit.refObj()));
                if (order_line_init.getObj_edit() == null) {
                    var obj = order_line_edit.refObj();
obj.orderid = order_main_init.getId_detail_edit();
                    $.post('/api/order_line/add', obj, function () {
                        window.location.reload();
                    });
                } else {
                    $.post('/api/order_line/edit', order_line_edit.refObj(), function () {
                        window.location.reload();
                    });
                }
            }
        }

        $(function () {
            order_line_edit = cusEdit();
            order_line_edit.init({
                data: order_line.data,
                editObj: order_line_init.getObj_edit()
                    });
            order_line_edit.initEdit();
        })
    </script>
</body>
</html>
